package com.student.model;

import java.sql.Timestamp;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * EmployMessage entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "Employ_Message", schema = "dbo", catalog = "StudentManager")
public class EmployMessage implements java.io.Serializable {

	// Fields

	private Long employId;
	private EmployCompany employCompany;
	private OccupationType occupationType;
	private Timestamp employTime;
	private String employPosition;
	private String positionIntroduction;
	private String placeOfWork;
	private Integer positionNum;
	private String languageDemand;
	private String workExperience;
	private String employContact;
	private String contactWay;
	private String salaryRange;
	private Set<ResumeSituation> resumeSituations = new HashSet<ResumeSituation>(
			0);

	// Constructors

	/** default constructor */
	public EmployMessage() {
	}

	/** minimal constructor */
	public EmployMessage(Long employId) {
		this.employId = employId;
	}

	/** full constructor */
	public EmployMessage(Long employId, EmployCompany employCompany,
			OccupationType occupationType, Timestamp employTime,
			String employPosition, String positionIntroduction,
			String placeOfWork, Integer positionNum, String languageDemand,
			String workExperience, String employContact, String contactWay,
			String salaryRange, Set<ResumeSituation> resumeSituations) {
		this.employId = employId;
		this.employCompany = employCompany;
		this.occupationType = occupationType;
		this.employTime = employTime;
		this.employPosition = employPosition;
		this.positionIntroduction = positionIntroduction;
		this.placeOfWork = placeOfWork;
		this.positionNum = positionNum;
		this.languageDemand = languageDemand;
		this.workExperience = workExperience;
		this.employContact = employContact;
		this.contactWay = contactWay;
		this.salaryRange = salaryRange;
		this.resumeSituations = resumeSituations;
	}

	// Property accessors
	@Id
	@Column(name = "Employ_id", unique = true, nullable = false, precision = 18, scale = 0)
	@GeneratedValue
	public Long getEmployId() {
		return this.employId;
	}

	public void setEmployId(Long employId) {
		this.employId = employId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "Company_id")
	public EmployCompany getEmployCompany() {
		return this.employCompany;
	}

	public void setEmployCompany(EmployCompany employCompany) {
		this.employCompany = employCompany;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "Occupation_Type_id")
	public OccupationType getOccupationType() {
		return this.occupationType;
	}

	public void setOccupationType(OccupationType occupationType) {
		this.occupationType = occupationType;
	}

	@Column(name = "Employ_Time", length = 23)
	public Timestamp getEmployTime() {
		return this.employTime;
	}

	public void setEmployTime(Timestamp employTime) {
		this.employTime = employTime;
	}

	@Column(name = "Employ_Position", length = 200)
	public String getEmployPosition() {
		return this.employPosition;
	}

	public void setEmployPosition(String employPosition) {
		this.employPosition = employPosition;
	}

	@Column(name = "Position_Introduction")
	public String getPositionIntroduction() {
		return this.positionIntroduction;
	}

	public void setPositionIntroduction(String positionIntroduction) {
		this.positionIntroduction = positionIntroduction;
	}

	@Column(name = "Place_Of_Work", length = 100)
	public String getPlaceOfWork() {
		return this.placeOfWork;
	}

	public void setPlaceOfWork(String placeOfWork) {
		this.placeOfWork = placeOfWork;
	}

	@Column(name = "PositionNum")
	public Integer getPositionNum() {
		return this.positionNum;
	}

	public void setPositionNum(Integer positionNum) {
		this.positionNum = positionNum;
	}

	@Column(name = "Language_Demand", length = 100)
	public String getLanguageDemand() {
		return this.languageDemand;
	}

	public void setLanguageDemand(String languageDemand) {
		this.languageDemand = languageDemand;
	}

	@Column(name = "Work_Experience", length = 50)
	public String getWorkExperience() {
		return this.workExperience;
	}

	public void setWorkExperience(String workExperience) {
		this.workExperience = workExperience;
	}

	@Column(name = "Employ_Contact", length = 50)
	public String getEmployContact() {
		return this.employContact;
	}

	public void setEmployContact(String employContact) {
		this.employContact = employContact;
	}

	@Column(name = "Contact_Way", length = 30)
	public String getContactWay() {
		return this.contactWay;
	}

	public void setContactWay(String contactWay) {
		this.contactWay = contactWay;
	}

	@Column(name = "Salary_Range", length = 50)
	public String getSalaryRange() {
		return this.salaryRange;
	}

	public void setSalaryRange(String salaryRange) {
		this.salaryRange = salaryRange;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "employMessage")
	public Set<ResumeSituation> getResumeSituations() {
		return this.resumeSituations;
	}

	public void setResumeSituations(Set<ResumeSituation> resumeSituations) {
		this.resumeSituations = resumeSituations;
	}

}